package springbootchapter03_03.Repository;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import springbootchapter03_03.entity.Comment;

import java.util.List;

public interface CommentRepository extends JpaRepository<Comment, Integer> {
    public List<Comment> findByAuthorNotNull();
    public List<Comment> findAllByAuthor(String author);

    public List<Comment> findAllByAuthorAndId(String author,Integer aId);

    public List<Comment> findAllByOrderByAId();

    List<Comment> getCommentPaged(int i, Pageable pageable);
}
